package com.dream.inspect.modules.business.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.dream.inspect.modules.business.entity.SuperviseProjectEntity;
import com.dream.inspect.modules.dream.pojo.SuperviseProjectFormMap;

/**
 * 督察立项表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-06-16 17:04:53
 */
public interface SuperviseProjectDao extends BaseMapper<SuperviseProjectEntity> {
	List<SuperviseProjectEntity> findAllList(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper, 
			@Param("currPage") int currPage,
            @Param("pageSize") int pageSize);
	int findAllListCount(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	SuperviseProjectEntity findDetailInfo(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	SuperviseProjectEntity findSuperviseProjectById(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	int selectThisMonthCount(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	SuperviseProjectEntity selectAllById(@Param("id") String id);

	public List<SuperviseProjectFormMap> findProjectList(@Param("map")Map<String ,Object> map, Page<SuperviseProjectFormMap> page);
	
	int findZczxAndLhdcCount(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	List<SuperviseProjectEntity> findZczxAndLhdcList(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper, 
			@Param("currPage") int currPage,
            @Param("pageSize") int pageSize);
	
	SuperviseProjectEntity findSuperviseProjectForCzztById(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	SuperviseProjectEntity findSuperviseProjectForSearchPage(@Param("id") String id);
	
	int findSuperviseProjectForSearchPageCount(@Param("ew") Wrapper<SuperviseProjectEntity> wrapper);
	List<SuperviseProjectEntity> findAllForSearchPage(@Param("searchAllText") String searchAllText, 
			@Param("deptId") String deptId,
			@Param("userId") String userId,
			@Param("userDeptName") String userDeptName,
			@Param("flag") String flag,
			@Param("currPage") int currPage,
            @Param("pageSize") int pageSize);
	
	int findAllForSearchPageCount(@Param("searchAllText") String searchAllText,
			@Param("deptId") String deptId,
			@Param("userDeptName") String userDeptName,
	@Param("flag") String flag);
}
